Skip to content

🚏 refactor: Move the Queued Follow-Up Row Into the Chat Package - #17868

Open
berry-13 wants to merge 2 commits into
devfrom
berry-13/chat-pending-turn2
Open

berry-13 wants to merge 2 commits into
devfrom
berry-13/chat-pending-turn2

Conversation

@berry-13

@berry-13 berry-13 commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

The queued follow-up row, the turn the server is about to admit after a completed response, is drawn by an app-side component that owns its own reveal bookkeeping, follow-scroll and composer-actions anchor. A themed consumer of @librechat/chat therefore cannot show a queued turn without copying that logic.

This moves the logic into a package PendingTurn: which queued turn is drawn (only after the response it follows, and not once the thread has a successor), when it follows a reader resting at the end of the thread into view, and where the composer's queued actions attach. The app keeps a thin adapter that supplies who sent it, their icon and how the text reads (markdown or plain), passed in as props. The spec moved with the logic into the package; the app keeps an adapter spec. No visible change.

Type of change

  • Refactor

Testing

Tested environments/configuration: jsdom specs; browser verification of the queued-turn scenarios is run through the gate once the PR is open.

Automated tests:

  • packages/chat: full jest, 185 suites and 2826 tests pass, including the ported PendingTurn spec (five cases: draws after the response it follows, nothing without a reveal, nothing on a different tail, leaves when the reveal ends, hides on a real successor); npm run typecheck clean.
  • client: tsc --noEmit clean; src/components/Chat specs pass except the existing AskUserQuestion(s) failures that also fail on dev and are owned elsewhere.
  • packages/client: 1163 tests pass.

The package owns which queued turn is drawn, when it follows the reader to the end of the thread, and where the composer's queued actions attach. The app keeps who sent it, their icon and how the text reads, passed in as props.
@berry-13 berry-13 added the 🔨 refactor Code cleanup without new features label Nov 6, 2026
Copilot AI balanced review requested due to automatic review settings November 6, 2026 16:48
@berry-13 berry-13 added the 🔨 refactor Code cleanup without new features label Nov 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T16:57:58.269593Z 57bcc26 New commits
🔒 Security Review ✅ Completed 2026-11-06T16:51:48.751319Z 87bda66 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

The spec already drives the queued turn through its reveal and handoff in the browser; the tag lets the gate record it as evidence for the row the package now draws.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 refactor Code cleanup without new features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants